<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
</head>

<body style="color:#333;padding:3px;">
    <!-- 标题 -->
    <div class="page-heade clearfix">
      <h2 class="clearfix text-center"><a class="col-md-6 title_color H_right H_active" id="Ap1" style="display: inline-block;font-size: 16px" href="{:url('index')}">TI费用需补发票列表</a> <a class="col-md-6 title_color"  id="Ap2" style="color:#333;font-size: 16px;display: inline-block;" href="{:url('index2')}" >TI费用补发票申请</a></h2>
    </div>
    <!-- 标题 -->
    
    <div>
   <form action="#" class="form-inline" id="f1" method="post">
      <table class="row-margin-top tab-content table-bordered table text-center" border="1">
          <table class="row-margin-top tab-content table-bordered table text-center" border="1">
          <tr>
            <td><label for="" class="form-label">经销商编号：</label></td>
            <td><input type="text" class="form-control" name="jsn" value="{$data.jsn}"></td>
            <td><label for="" class="form-label">经销商名称：</label></td>
            <td style="min-width: 140px;width: 140px"><input type="text" class="form-control" name="jname" id="" value="{$data.jname}"></td>
            <td><label for="" class="form-label">核销单号：</label></td>
            <td><input type="text" class="form-control" name="he_no" value="{$data.he_no}"></td>
            <td><label for="" class="form-label">原活动单号编号：</label></td>
            <td><input type="text" class="form-control" name="ap_no" id="" value="{$data.ap_no}"></td>
          </tr>
          <tr>
            <td colspan="8">
          <button class="btn btn-info query" id="check">查询</button>
           <button class="btn btn-info LendExcel" type="button">导出Excel</button>
           <button class="btn btn-info emptyIf" id="clear_check" type="button">清空查询条件</button>
            </td>
          </tr>
      </table>
      </table>
    
      <table class="table table-striped row-margin-top table-bordered text-center bud_hei">
         <tr class="info text-center">
            <th class="text-center">序号</th>
            <th class="text-center">是否补发票中</th>
            <th class="text-center">核销明细编号</th>
            <th class="text-center">原活动明细编号</th>
            <th class="text-center">经销商编号</th>
            <th class="text-center">经销商名称</th>
             <th class="text-center">收款方</th>
            <th class="text-center">支付未税金额</th>
            <th class="text-center">支付税金</th>
            <th class="text-center">是否增值税</th>
            <th class="text-center">核销申请人</th>
          </tr>
          {volist name="apply" id="vo"}
          <tr>
            <td>{$i}</td>
             <td>{if $vo.bu_state==0}否{else/}是{/if}</td>
             <td><a onclick="hx({$vo.ahpid})">{$vo.ahpno}_{$vo.ahdno}</a></td>
             {if $vo.type_id==2}
             <td><a onclick="cg({$vo.apid})">{$vo.apno}_{$vo.apdno}</a></td>
             {elseif $vo.type_id==1/}
            <td><a onclick="jc({$vo.apid})">{$vo.apno}_{$vo.apdno}</a></td>
              {else/}
              <td><a onclick="fcg({$vo.apid})">{$vo.apno}_{$vo.apdno}</a></td>
              {/if}
              <td>{$vo.jxs_no}</td>
             <td>{$vo.jxs_name}</td>
             {if $vo.payee}
             <td>(供货商){$vo.gys_name}</td>
             {else/}
             <td>(经销商){$vo.jxs_name}</td>
             {/if}
             <td class="num2 ObjectNum">{$vo.weishuihexiaojine}</td><td class="num2 ObjectNum">{$vo.shuijin}</td>
             <td>{if $vo.isVAT==1}是{else/}否{/if}</td><td>{$vo.em_name}</td>
          </tr>
          {/volist}
          <tfoot>
              <tr class="trTotal">
            <td colspan="7" class="text-right">合计：</td>
            <td class="text-right num2 ObjectNum">{$zongjine}</td>
            <td class="text-right num2 ObjectNum">{$shuijin}</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          </tfoot>
      </table>
</form>
    </div>
     <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
     <script src="__STATIC__/layout/js/common.js"></script>

    <!--统计代码，可删除-->
    <script>
     function hx(aid){
     var index = layer.open({
                            type:2,
                            title:'常规促销申请',
                            area:['100%','100%'],
                            maxmin:true,
                            content:'{:url("Tihexiao/view")}?id='+aid
                        })
}
    function cg(aid){
     var index = layer.open({
                            type:2,
                            title:'常规促销申请',
                            area:['100%','100%'],
                            maxmin:true,
                            content:'{:url("Ti_apply/apply_de")}?aid='+aid
                        })
}
 function fcg(aid){
     var index = layer.open({
                            type:2,
                            title:'非常规促销申请',
                            area:['100%','100%'],
                            maxmin:true,
                            content:'{:url("Ti_apply2/view")}?id='+aid
                        })
}
function jc(aid){
  var index = layer.open({
                            type:2,
                            title:'Ti进场费用申请',
                            area:['100%','100%'],
                            maxmin:true,
                            content:'{:url("Tijinchang/view")}?id='+aid
                        })
}
    $(".LendExcel").click(function(){
      location.href="{:url('daochu')}";
    })
     
        $(document).ready(function(){
              $(".num2").each(function(){
        $(this).html(parseFloat($(this).html()).toFixed(2));
     })
         
         var $ObjectNum =$(".ObjectNum");
               toNum($ObjectNum);
        })
       $("#check").click(function(){
             
              document.getElementById("f1").submit();
        })
        $("#clear_check").click(function(){
            $("input[type='text']").val("");
           
             document.getElementById("f1").submit();
        })
    </script>
</body>

</html>
